# -*- coding: utf-8 -*-
"""
@Time : 2024/5/3 12:34 PM
@Author: imamhusan
@Des: 微信用户
"""
from tortoise import Model, fields


class WxUser(Model):
    nickName = fields.CharField(max_length=128, description='名称')
    avatarUrl = fields.CharField(max_length=512, description='头像')
    openid = fields.CharField(max_length=64, description='用户唯一标志')
    phone = fields.CharField(null=True, max_length=11, description='手机号')
    xuser = fields.IntField(default=0, description='代理ID')
    point = fields.IntField(default=0, description='积分或零钱')
    create_time = fields.DatetimeField(auto_now_add=True, description='创建时间')
    update_time = fields.DatetimeField(auto_now=True, description='更新时间')

    class Meta:
        table = 'wx_user'
        table_description = '微信用户表'
